$(function(){
    
  $.ajax({
      type:'get',
      url:'http://193.112.55.79:9090/api/getcoupon',
      datatype: 'json',
      success:function(result){
       console.log(result);
        var html=[];
        for(var i=0; i<result['result'].length; i++){
            html.push('<li>\
            <a href="kfc_coupon.html?couponId='+result['result'][i]['couponId']+'">\
            <img src="'+result['result'][i]['couponImg']+'" alt="">\
                <span>'+result['result'][i]['couponTitle']+'</span>\
            </a>\
        </li>\
            '
            )
      $('.mmm_kfcn').html(html.join(""));
        }
    }
  })  
})